myApp.factory('commandService', ['$http', '$q', '$rootScope', function ($http, $q, $rootScope) {
    var commandService = {};
    var apiUrl = $rootScope.url + '/web/command';
    var that = this; //
    var defered = $q.defer();
    var url = $rootScope.urlZ;
    var postCfg = {
        headers: {'Content-Type': 'application/x-www-form-urlencoded'},
        transformRequest: function (data) {
            return $.param(data);
        }
    };

    commandService.getDtcList = function () {
        return $http.get(apiUrl + '/dtc');
    };

    commandService.getModelList = function () {
        return $http.get(apiUrl + '/model');
    };


    return commandService;
}]);
